#!/usr/bin/ruby
# -*- ruby -*-
#
# http://programmingpraxis.com/2013/05/03/pairing-students/

require 'pp'
require 'set'

students = ARGV

pairs = students.permutation(2).inject(Set.new) do |acc, p|
  acc << p.sort
end

pp pairs
